package klok;

import java.util.Random;

public class RandomIntegers {

	public static void main(String[] args) {
		RandomIntegers ri = new RandomIntegers();
		ri.generateRandomString(10);
	}

	private Comparable[] generateRandomString(int length) {
		Comparable[] list = new Comparable[length];
		Random random = new Random();
		int wordSize;
		for (int i = 0; i < length; i++) {
			wordSize = random.nextInt(10);
			while(wordSize == 0){
				wordSize = random.nextInt(10);
			}
			String generatedWord;

			char[] word = new char[wordSize];

			for (int i1 = 0; i1 < wordSize; i1++) {
				int randomNo = random.nextInt(255);
				word[i1] = (char) randomNo;
				if (i1 == 0) {
					while ((randomNo < 65 ^ randomNo > 90)) {
						randomNo = random.nextInt(255);
						word[i1] = (char) randomNo;
					}
				} else {
					while ((randomNo < 97 ^ randomNo > 122)) {
						randomNo = random.nextInt(255);
						word[i1] = (char) randomNo;
					}
				}

			}
			generatedWord = new String(word);
			System.out.println("woord = " + generatedWord);
		}

		return list;

	}
}
